#endif
/* Suivant - Do we have to get struct ltchars data? */
-#ifdef TIOCGLTC
+#ifdef HAVE_LTCHARS
if (ioctl (fd, TIOCGLTC, &settings->ltchars) < 0)
return -1;
#endif
/* How about a struct tchars and a wordful of lmode bits? */
-#ifdef TIOCGETC
+#ifdef HAVE_TCHARS
if (ioctl (fd, TIOCGETC, &settings->tchars) < 0
|| ioctl (fd, TIOCLGET, &settings->lmode) < 0)
return -1;
#endif
/* Suivant - Do we have to get struct ltchars data? */
-#ifdef TIOCGLTC
+#ifdef HAVE_LTCHARS
if (ioctl (fd, TIOCSLTC, &settings->ltchars) < 0)
return -1;
#endif
/* How about a struct tchars and a wordful of lmode bits? */
-#ifdef TIOCGETC
+#ifdef HAVE_TCHARS
if (ioctl (fd, TIOCSETC, &settings->tchars) < 0
|| ioctl (fd, TIOCLSET, &settings->lmode) < 0)
return -1;
char _sobuf[BUFSIZ];
#endif
-#ifdef TIOCGLTC
+#ifdef HAVE_LTCHARS
static struct ltchars new_ltchars = {-1,-1,-1,-1,-1,-1};
#endif
-#ifdef TIOCGETC
+#ifdef HAVE_TCHARS
static struct tchars new_tchars = {-1,-1,-1,-1,-1,-1};
#endif
control for user coming over network on 4.2; in this case,
only t_stopc and t_startc really matter. */
#ifndef HAVE_TERMIO
-#ifdef TIOCGETC
+#ifdef HAVE_TCHARS
/* Note: if not using CBREAK mode, it makes no difference how we
set this */
tty.tchars = new_tchars;
lmode = tty.lmode;
#endif
-#endif /* TIOCGETC */
+#endif /* HAVE_TCHARS */
#endif /* not HAVE_TERMIO */
-#ifdef TIOCGLTC
+#ifdef HAVE_LTCHARS
tty.ltchars = new_ltchars;
-#endif /* TIOCGLTC */
+#endif /* HAVE_LTCHARS */
EMACS_SET_TTY (input_fd, &tty, 0);
#undef SIGIO
#endif
+/* On TERMIOS systems, the tcmumbleattr calls take care of these
+ parameters, and it's a bad idea to use them (on AIX, it makes the
+ tty hang for a long time).
+#if defined (TIOCGLTC) && !defined (HAVE_TERMIOS)
+#define HAVE_LTCHARS
+#endif
+
+#if defined (TIOCGETC) && !defined (HAVE_TERMIOS)
+#define HAVE_TCHARS
+#endif
+
\f
/* Try to establish the correct character to disable terminal functions
in a system-independent manner. Note that USG (at least) define
#endif
#endif
#endif
-#ifdef TIOCGLTC
+
+/* If we have TERMIOS, we don't need to do this - they're taken care of
+ by the tc*attr calls. */
+#ifndef HAVE_TERMIOS
+#ifdef HAVE_LTCHARS
struct ltchars ltchars;
#endif
-#ifdef TIOCGETC
+
+#ifdef HAVE_TCHARS
struct tchars tchars;
int lmode;
#endif
+#endif
};
\f
/* Define EMACS_GET_TTY and EMACS_SET_TTY,